package com.yidu.drug.dao;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.yidu.drug.model.FdPurchaseModel;

public interface FdPurchaseModelMapper {
	
	//删除
    int deleteByPrimaryKey(String fdPoId);

    int insert(FdPurchaseModel record);

    //新增订单
    int insertSelective(FdPurchaseModel record);
    
    FdPurchaseModel selectByPrimaryKey(String fdPoId);
    
    //根据id修改订单
    int updateByPrimaryKeySelective(FdPurchaseModel record);

    int updateByPrimaryKey(FdPurchaseModel record);
    
    //查询订单表中的所有订单
    public List<FdPurchaseModel> findAll(@Param("fdPurchaseModel")FdPurchaseModel fdPurchaseModel,@Param("page")int page,@Param("limit")int limit);
    
    /**
     * 分页·查询
     * @param fdPurchaseModel
     * @return
     */
    int findRows(FdPurchaseModel fdPurchaseModel);
    /**
     * 根据id修改价格和数量
     * @param fdSunnum
     * @param fdSumprice
     * @param fdPoId
     * @return
     */
    int updates(@Param("fdSunnum")Long fdSunnum,@Param("fdSumprice")BigDecimal fdSumprice,@Param("fdPoId")String fdPoId);

	List<FdPurchaseModel> findAllPage(Map<String,String> paramMap);
}